package com.heima.feigins;

import com.heima.config.HeimaFeiginAutoConfiguration;
import com.heima.feigins.fallback.ApUserFeiginFallback;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.pojos.ApUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "leadnews-user",fallbackFactory = ApUserFeiginFallback.class,configuration = HeimaFeiginAutoConfiguration.class)
public interface ApUserFeigin {
    @GetMapping("/api/v1/user/{id}")
    public ResponseResult<ApUser> findApUserById(@PathVariable("id") Integer apUserId);
}
